<!DOCTYPE html>
<html>
<head>
	<title>表单管理</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/min.css" />
	<link rel="stylesheet" href="__PUBLIC__/Admin/content/style.css" />

	<!-- jQuery AND jQueryUI -->
	<script type="text/javascript" src="__PUBLIC__/Admin/js/libs/jquery/1.6/jquery.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Admin/js/libs/jqueryui/1.8.13/jquery-ui.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Admin/js/min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Admin/content/main.js"></script>
	<style>
	#content .selector, #content .selector select, #content .selector span{
		width:80px !important;
	}
	</style>
</head>
<body>
<div id="content" class="white">
	<?php
		$User = session('User');
	?>
  <div class="bloc">
    <div class="title"></div>
    <div class="content">
      <table>
        <thead>
          <tr>
			<volist name='fieldNameList' id='vo2'>
				<th>{$vo2.fieldname}</th>
			</volist>
			<th>创建人</th>
			<th>
				<?php if($canCreate==1){ ?>
				<input onclick="javascript:location.href='{:U('Moduleinstance/editUI')}?moduleId={$moduleId}'" type="button" value="添加">
				<?php }?>
			</th>
          </tr>
        </thead>
        <tbody>
		  <!--遍历容器List-->
          <volist name='list' id='vo'>
            <tr>
				<volist name='fieldNameList' id='vo2'>
					<td><center><?php echo $vo[$vo2[dbname]]; ?></center></td>
				</volist>
					<td><center><?php echo $vo[bs_uname]; ?></center></td>
				<td><center>
					<?php
						if($User[id]==$vo[bs_uid]){
					?>
						<input onclick="javascript:editUI('{$vo.id}')" type="button" value="编辑">
						<input onclick="javascript:removeOperation('{$vo.id}')" type="button" value="删除">
					<?php
						}
					?>
				</center></td>
            </tr>
          </volist>
        </tbody>
      </table>
      <div class="left submit">
       
      </div>
      <div class="pagination"> {$page} </div>
    </div>
  </div>
</div>
<script>
	function editUI(id){
		moduleId='{$moduleId}';
		location.href = "{:U('Moduleinstance/editUI')}?id="+id+"&moduleId="+moduleId;
	}
	function removeOperation(id){
		moduleId='{$moduleId}';
		if(confirm("删除id:"+id)){
			location.href = "{:U('Moduleinstance/removeOperation')}?id="+id+"&moduleId="+moduleId;
		}
	}
</script>
</body>
</html>